---
title: Overview
---

## About

Welcome to the Blok examples section! Here, you will find practical examples demonstrating how to use Blok to build various types of applications and implement common patterns. Each example is designed to be a hands-on guide, complete with explanations and code snippets.

## Getting Started with Examples

These examples are structured as self-contained projects that can be easily integrated into a standard Blok project created with `nanoctl`.

To run these examples, you will need:

1. A Blok project set up (see [First Steps](../introduction/first-steps.mdx)).
2. The `nanoctl` CLI tool.
3. Any specific dependencies mentioned in the individual example (e.g., database clients, external API keys if applicable).

Each example has its own documentation with detailed setup instructions, code explanations, and usage guidelines.

## Available Examples

Here are the examples covered in this documentation. Click on each link to explore the detailed guide:

* **[Countries API Example](./countries-example.mdx)**: A simple example demonstrating how to create a workflow that fetches data from an external API using the built-in `@nanoservice-ts/api-call` node. This example shows how to retrieve a list of countries and their capitals from a public API and return the data as a JSON response.

* **[Database Smart Query (DB Manager)](./db-manager.mdx)**: An advanced example showcasing how to create an AI-powered database query interface. This example demonstrates how to build a workflow that allows users to query a PostgreSQL database using natural language prompts, which are then converted to SQL queries using AI. It includes a complete UI, dynamic database schema introspection, and real-time query execution.

## How to Use This Section

1. **Choose an example**: Select either the simple Countries API example or the more advanced DB Manager example based on your needs.
2. **Read the overview**: Each example page starts with a description of its purpose and what it demonstrates.
3. **Examine the code**: Review the Node implementations and the Workflow definitions provided in the documentation.
4. **Follow setup instructions**: Make sure to follow the specific setup steps (e.g., installing dependencies, setting environment variables).
5. **Run the example**: Execute the workflow as described, usually by starting the Blok runner and accessing it via a browser or API client.
6. **Experiment**: Modify the example code to better understand its workings or to adapt it to your own needs.

These examples are intended to be a starting point. We encourage you to build upon them and explore the full potential of Blok .

If you have an idea for a new example or want to contribute, please check our [Contributing Guide](../community/contributing.mdx).
